<?php
class BenchmarkController extends Zend_Controller_Action 
{
    
    
    
    public function indexAction()
    {
        $app = Led_Application::getInstance();
        
        $entids = $app->getDb()->fetchAll("SELECT id, type_id FROM edo ORDER BY type_id, id");

        $start = microtime(true);
                       
        foreach($entids as $row)
        {
            $obj = $app->getEdo()->fetch($row['id'], $row['type_id']);
        }
        
        $end = microtime(true) - $start;
        
        print "<hr />";
        print $end;
        print "<hr />";
        
        
    }
    
    
    public function renderAction()
    {
        
         
        $obj = $app->getEdo()->fetch($this->_getParam('id'));
        

        Zend::loadClass('Led_Entity_Renderer');
        Zend::loadClass('Led_Entity_Collection');
        Zend::loadClass('Led_Entity_Collection_TreeDescriptor');
        
    
               
        
        
        
        $this->getResponse()->appendBody($renderer->render($obj, 'retail'));
               
        

    }
    
}